package com.example.mapper.institutioncare.congyerenyuan;

import com.example.bean.institutioncare.congyerenyuan.CongYeVo;
import com.example.bean.login.TUserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CongYeRenYuanMapper {
    List<TUserInfo> congyepage(CongYeVo congYeVo);

    @Insert("insert into t_user_info(noid,jigou_id,user_name,user_code,user_password,user_identity,sex,user_idcard,leibie,ruzhi_date,minzu,is_zaibian,birthday,is_hunyin,zhengzhimianmao,wenhua,jiguan,address,resume,zhengjianzhao,jianli) values(replace(uuid(),'-',''),#{jigouId},#{userName},#{userCode},#{userPassword},#{userIdentity},#{sex},#{userIdcard},#{leibie},#{ruzhiDate},#{minzu},#{isZaibian},#{birthday},#{isHunyin},#{zhengzhimianmao},#{wenhua},#{jiguan},#{address},#{resume},#{zhengjianzhao},#{jianli})")
    Integer addcongye(TUserInfo tUserInfo);

    @Select("select * from t_user_info where noid = #{noid}")
    TUserInfo huixiancongye(String noid);

    @Update("update t_user_info set jigou_id = #{jigouId},user_name = #{userName},user_code = #{userCode},user_password = #{userPassword},user_identity = #{userIdentity},sex = #{sex},user_idcard = #{userIdcard},leibie = #{leibie},ruzhi_date = #{ruzhiDate},minzu = #{minzu},is_zaibian = #{isZaibian},birthday = #{birthday},is_hunyin = #{isHunyin},zhengzhimianmao = #{zhengzhimianmao},wenhua = #{wenhua},jiguan = #{jiguan},address = #{address},resume = #{resume},zhengjianzhao = #{zhengjianzhao},jianli = #{jianli} where noid = #{noid}")
    Integer updacongye(TUserInfo tUserInfo);

    Integer delecongye(List<String> ids);

//    @Insert("insert into t_user_info(lizhi_date,lizhiyuanyin) values(now(),lizhiyuanyin)")
//    Integer congyelizhi(TUserInfo tUserInfo);

    Integer xiugailizhi(List<String> noid);
}
